<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jQuery/jQuery-1.11.3.min.js"></script>
    <script>
        $(function () {
            $("#delButton").click(function () {
                $.ajax({
                    url:'employee/1',
                    type:'delete'
                })
            })
        })


        //HttpPutFormContentFilter 这个put、PATCH请求  springmvc需要配置  Springboot已经帮你做好了

        $(function () {
            $("#editButton").click(function () {
                $.ajax({
                    url:'employee/1',
                    type:'put',
                    data:{
                        name:'admin'
                    }
                })
            })
        })

    </script>

</head>


<body>

    <button id="delButton">删除</button>

    <button id="editButton">修改</button>

<!--HiddenHttpMethodFilter 这个是支持表单提交的put等请求  springmvc需要filter  Springboot需要在配置中放开-->

    <form action="employee/1" method="post">
        <input type="hidden" name="_method" value="put"/>
        <input name="name"/>
        <button type="submit">提交</button>
    </form>

</body>
</html>